#pragma once
#include <core/core.h>
#include <core/string.h>
#include <core/file.h>

namespace Core
{
    class CORE_API Dir
    {
    private:
        friend class FileSystem;
        String m_path;

        Dir(){}
        Dir(const Dir&){}
        const Dir& operator=(const Dir& ){return *this;}
        Dir(const String& path){}
    public:

        //opens file in the directory
        File* file(const String& s, IODevice::OpenMode om);

        const String& path() const {return m_path;}
        
        static String pathFromFileName(const String& fileName);
        //
        static String::Char PathSeparator;
    };

    class CORE_API FileSystem
    {
    public:
        enum SpecialDirectory
        {
            TempDirectory,
            UserDirectory,
            DocumentsDirectory,
            PicturesDirectory,
            MusicDirectory,
            ApplicationDirectory,
        };

        FileSystem(){}
        ~FileSystem(){}

        //open existing directory, return pointer which you should delete
        Dir* openDir(const String& s);

        //create a new directory
        Dir* makeDir(const String& s);

        //return patjh to special dir(temp, documents, system and etc.)
        String getSpecialPath(SpecialDirectory specialDir);

    };


}
